<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: Logger类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_logger-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Logger类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>日志类,用于记录重要信息到文件系统中  
 <a href="class_logger.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_logger_8h_source.html">Logger.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a3bb2e96a5399ecfb948394f1a1a84757"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logger.html#a3bb2e96a5399ecfb948394f1a1a84757">init</a> (std::string dir, std::string logFilePref=&quot;log&quot;)</td></tr>
<tr class="memdesc:a3bb2e96a5399ecfb948394f1a1a84757"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化日志  <a href="#a3bb2e96a5399ecfb948394f1a1a84757">更多...</a><br /></td></tr>
<tr class="separator:a3bb2e96a5399ecfb948394f1a1a84757"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e63cbc1d6d8f374afe1d3e12b5f5842"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logger.html#a4e63cbc1d6d8f374afe1d3e12b5f5842">log</a> (const char *fmt,...)</td></tr>
<tr class="memdesc:a4e63cbc1d6d8f374afe1d3e12b5f5842"><td class="mdescLeft">&#160;</td><td class="mdescRight">记录日志  <a href="#a4e63cbc1d6d8f374afe1d3e12b5f5842">更多...</a><br /></td></tr>
<tr class="separator:a4e63cbc1d6d8f374afe1d3e12b5f5842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee38897c7bb4cd9fe325fa7c07678d15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logger.html#aee38897c7bb4cd9fe325fa7c07678d15">closeLog</a> ()</td></tr>
<tr class="memdesc:aee38897c7bb4cd9fe325fa7c07678d15"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭日志  <a href="#aee38897c7bb4cd9fe325fa7c07678d15">更多...</a><br /></td></tr>
<tr class="separator:aee38897c7bb4cd9fe325fa7c07678d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a9ddfac0640ed92ac153f7e24f6134bcb"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_logger.html">Logger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logger.html#a9ddfac0640ed92ac153f7e24f6134bcb">getInstance</a> ()</td></tr>
<tr class="memdesc:a9ddfac0640ed92ac153f7e24f6134bcb"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取Logger单例  <a href="#a9ddfac0640ed92ac153f7e24f6134bcb">更多...</a><br /></td></tr>
<tr class="separator:a9ddfac0640ed92ac153f7e24f6134bcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>日志类,用于记录重要信息到文件系统中 </p>
<dl class="section note"><dt>注解</dt><dd>注意:记录日志由于要读写文件，速度会比较慢， 请不要记录无用信息,尽量只记录重要信息!!! </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="aee38897c7bb4cd9fe325fa7c07678d15"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::closeLog </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭日志 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a9ddfac0640ed92ac153f7e24f6134bcb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_logger.html">Logger</a>* Logger::getInstance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取Logger单例 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Logger* </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a3bb2e96a5399ecfb948394f1a1a84757"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Logger::init </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>dir</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>logFilePref</em> = <code>&quot;log&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化日志 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dir</td><td>指定日志文件保存目录 </td></tr>
    <tr><td class="paramname">logFilePref</td><td>指定日志文件名前缀 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>每调用一次将产生一个log文件,文件名自动添加时间后缀,日志文件名格 式如logFile_20130101235959,创建时间为2013-01-01 23:59:59 </dd></dl>

</div>
</div>
<a class="anchor" id="a4e63cbc1d6d8f374afe1d3e12b5f5842"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::log </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>记录日志 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>格式化字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_logger_8h_source.html">Logger.h</a></li>
<li>libemb/src/Logger.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:39 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
